<template>
	<view>
		<dai v-show="PageCur=='daiChan'"></dai>
		<history v-show="PageCur=='historyChan'"></history>
		<view class="cu-bar tabbar bg-white shadow foot">
			<view class="action" @click="NavChange" data-cur="daiChan">
				<view :class="['tab-icon-block', PageCur == 'daiChan'?'bg-blue':'bg-white']">
					<text :class="['ph-daichandingdanhuizong', 'font-size34', PageCur == 'daiChan'?'text-white':'text-gray']"></text>
				</view>
				<view :class="PageCur=='daiChan'?'text-blue':'text-gray'">待产订单汇总</view>
			</view>
			<view class="action" @click="NavChange" data-cur="historyChan">
				<view :class="['tab-icon-block', PageCur == 'historyChan'?'bg-blue':'bg-white']">
					<text :class="['ph-shijian', 'font-size34', PageCur == 'historyChan'?'text-white':'text-gray']"></text>
				</view>
				<view :class="PageCur=='historyChan'?'text-blue':'text-gray'">历史订单汇总</view>
			</view>
		</view>
	</view>
</template>

<script>
	import dai from './dai.vue'
	import history from './historyOrder.vue'
	export default {
		components: {
			dai,
			history
		},
		data() {
			return {
				PageCur: 'daiChan',
			}
		},
		methods: {
			NavChange: function(e) {
				this.PageCur = e.currentTarget.dataset.cur
			}
		}
	}
</script>

